package com.coolnie.service;

import com.coolnie.dao.UsersMapper;
import com.coolnie.entity.Users;
import org.apache.ibatis.annotations.Param;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * Created by Administrator on 2017/6/14 0014.
 */
//@Service("usersService")
public class UsersServiceImpl implements UsersService {

    @Autowired
    private UsersMapper usersMapper;

    @Override
    public List<Users> findAll() {
        return usersMapper.findAll();
    }

    @Override
    public int insert(Users record) {
        return usersMapper.insert(record);
    }

    @Override
    public Users findOne(@Param("username") String username) {
        return usersMapper.findOne(username);
    }

    @Override
    public int insertSelective(Users record) {
        return usersMapper.insertSelective(record);
    }

    @Override
    public int deleted(@Param("username") String username) {
        return usersMapper.deleted(username);
    }

    @Override
    public int update(Users record) {
        return usersMapper.update(record);
    }

}
